import React, { useEffect, useState } from "react";
import { useRouter } from "@tarojs/taro";
import { WebView } from "@tarojs/components";

const Index: React.FC<{}> = () => {
  const [src, setSrc] = useState("");
  const router = useRouter();
  useEffect(() => {
    setSrc(router.params.src);
  }, [router]);

  return <WebView src={src}></WebView>;
};

export default Index;
